//
//  UTIntTests.swift
//  iPhoneUTests
//
//  Created by Toj on 3/28/23.
//

import Foundation

import XCTest

class UTIntTests: XCTestCase {

    override func setUpWithError() throws {
        // Put setup code here. This method is called before the invocation of each test method in the class.
    }

    override func tearDownWithError() throws {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
    }

    func testExample() throws {
        testPrime()
    }

    func testPerformanceExample() throws {
        // This is an example of a performance test case.
        self.measure {
            // Put the code you want to measure the time of here.
        }
    }
}

extension UTIntTests {
    
    func testPrime() {
        let max = UInt32.max
        let random = arc4random_uniform(max)
        CM.absoluteTimes {
            let result = random.cm_isPrime
            print("-->UTests: number: \(random), isPrime :\(result)")
        }
    }
}
